﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <object
   classid="clsid:3B835D63-ABFE-413a-9F3B-20329A2CDEEE" 
   id="comcardmanager" 
   codebase="http://localhost/COMCardmanager/com/COMCardmanager.dll#Version=1,0,0,12"
   width="10px" height="10px"    
   >
   <span style="color:red">Unable to install COMCardmanager -- Please, check security paramaters.</span>
   <param name="_Version" value="65536" />
    <param name="_ExtentX" value="2646" />
    <param name="_ExtentY" value="1323" />
    <param name="_StockProps" value="0" />
	<param name="XMLSettingsToLoad" value="-x E:/facil/SDK/Lib/ConfigChipMgrCardManager.xml -a CARDApp -i CARDInstance" />

</object>
		<title>HTML COMCardmanager JavaScript Demo</title>
	    <style type="text/css">
            .style1
            {
                width: 51px;
            }
            #TextArea1
            {
                width: 540px;
            }
            .style2
            {
                width: 490px;
            }
            #TextArea2
            {
                width: 540px;
            }
            .style3
            {
                width: 37px;
            }
        </style>
	
    <script type='text/javascript' language='javascript'>
        var jsonCG;
        var jsonPC;

        function callReadCG() {
            try {
                var mycomcardmanager;
                mycomcardmanager = new ActiveXObject("COMCardmanager.Card");
                //you don't need to call setConfigToLoad in default case as default value is
                //-x C:/facil/SDK/Lib/ConfigChipMgrCardManager.xml -a CARDApp -i CARDInstance
                //mycomcardmanager.setConfigToLoad("E:/facil/SDK/Lib/ConfigChipMgrCardManager.xml");
                jsonCG = mycomcardmanager.readCG();
            }
            catch (e) {
                jsonCG = e.message;
            }
            document.getElementById('TextArea2').value = jsonCG;

        }

        function callReadPC() {
            try {
                var mycomcardmanager;
                mycomcardmanager = new ActiveXObject("COMCardmanager.Card");
                //you don't need to call setConfigToLoad in default case as default value is
                //-x C:/facil/SDK/Lib/ConfigChipMgrCardManager.xml -a CARDApp -i CARDInstance
                //mycomcardmanager.setConfigToLoad("E:/facil/SDK/Lib/ConfigChipMgrCardManager.xml");
                jsonPC = mycomcardmanager.readPC();
            }
            catch (e) {
                jsonPC = e.message;
            }
            document.getElementById('TextArea3').value = jsonPC;

        } 
    </script> 
    
    </head>
	<body>
	
	    <table style="width:100%;">
		<tr>
		<td>
		<img src="Atlanta-logo.jpg" alt="" /> 
		</td>
		</tr>
		<tr>
		<td class="style1">
                    <input id="ButtonCG" type="button" value="ReadCG" onclick="callReadCG()"/></td>
		<td class="style1">
                    <input id="ButtonPC" type="button" value="ReadPC" onclick="callReadPC()" /></td>
		</tr>
		<tr>
		<td class="style2" style="width:50%">
                    <textarea id="TextArea2" name="S2" rows="25" cols="50"></textarea></td>				
		<td class="style2" style="width:50%">
                    <textarea id="TextArea3" name="S3" rows="25" cols="50"></textarea></td>
					
		</tr>
        </table>
	
	</body>
</html>